/*******************************************************************************
 * Copyright (c) 2008, 2009 Tapestry IDE Developers
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Tapestry IDE Developers - initial API and implementation
 *******************************************************************************/
package com.googlecode.tapestry.ide.internal.core.model.resources;

import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;

import com.googlecode.tapestry.ide.core.model.resources.TapestryResourceChangeListener;

/**
 * Defines callbacks for the {@link TapestryResourceChangeListener}.
 */
public interface ITapestryResourceChangeEvents {

	/**
	 * Checks if is Tapestry project.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 * 
	 * @return true, if is Tapestry project
	 */
	boolean isTapestryProject(IProject project, int eventType);

	/**
	 * Tapestry nature added.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void tapestryNatureAdded(IProject project, int eventType);

	/**
	 * Tapestry nature removed.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void tapestryNatureRemoved(IProject project, int eventType);

	/**
	 * Project added.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void projectAdded(IProject project, int eventType);

	/**
	 * Project opened.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void projectOpened(IProject project, int eventType);

	/**
	 * Project closed.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void projectClosed(IProject project, int eventType);

	/**
	 * Project deleted.
	 * 
	 * @param project
	 *            the project
	 * @param eventType
	 *            the event type
	 */
	void projectDeleted(IProject project, int eventType);

	/**
	 * Resource added.
	 * 
	 * @param file
	 *            the file
	 * @param eventType
	 *            the event type
	 */
	void resourceAdded(IFile file, int eventType);

	/**
	 * Resource removed.
	 * 
	 * @param file
	 *            the file
	 * @param eventType
	 *            the event type
	 */
	void resourceRemoved(IFile file, int eventType);

	/**
	 * Component changed.
	 * 
	 * @param file
	 *            the file
	 * @param eventType
	 *            the event type
	 */
	void resourceChanged(IFile file, int eventType);
}
